package work01;

import java.util.Iterator;
import java.util.LinkedList;

/**
 * @author sunlggggg
 * @date 2017/2/27
 */
public class DividendZeroRepaired {
    public static void main(String[] args) {
        LinkedList<Integer> list = new LinkedList<>();
        list.add(0);
        list.add(1);
        list.add(2);
        list.add(3);
        list.add(4);
        list.add(5);
        Iterator iterator = list.iterator();
        while (iterator.hasNext()){
            System.out.println(iterator.next());
            iterator.remove();
        }
    }
}
